﻿using GameFramework.Event;
using GameFramework;
using TowerDefence_Zombie.Data;

namespace TowerDefence_Zombie
{
    public class LevelFailEventArgs : GameEventArgs
    {
        public static readonly int EventId = typeof(LevelFailEventArgs).GetHashCode();

        public int Level
        {
            get;
            private set;
        }

        public LevelFailEventArgs()
        {
            Level = 0;
        }

        public override int Id
        {
            get
            {
                return EventId;
            }
        }

        public static LevelFailEventArgs Create(int level)
        {
            LevelFailEventArgs levelSuccessEvent = ReferencePool.Acquire<LevelFailEventArgs>();
            levelSuccessEvent.Level = level;
            return levelSuccessEvent;
        }

        public override void Clear()
        {
            Level = 0;
        }
    }
}

